import { takeEvery, put, delay} from "@redux-saga/core/effects";
import { loadProduct, saveProduct } from "../actions/product.action";
import axios from "axios"
function* handleLoadProduct(){
   const { data } = yield axios.get("http://localhost:3005/goods");
   yield put(saveProduct(data))
}

export default function* productSaga(){
    yield takeEvery(loadProduct,handleLoadProduct)
}